home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / MPW_Only / Interfaces / CIncludes / errno.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-01-17  |  3.2 KB  |  77 lines  |  [TEXT/MPS ]

  1. /************************************************************
  2.  
  3.     errno.h
  4.     Error reporting macros
  5.  
  6.     Copyright Apple Computer,Inc.  1995
  7.     All rights reserved
  8.  
  9.  * Warning:  Not all of these macros are a part of the ANSI C standard.
  10.  *           This header is not POSIX compliant.
  11.  *           The library functions are not guaranteed to set "errno"
  12.  *              to the value of any of the non-ANSI macros.
  13.  *           For portable code, do not use the non-ANSI macros.
  14.  
  15.  ************************************************************/
  16.  
  17.  
  18. #ifndef __ERRNO__
  19. #define __ERRNO__
  20.  
  21. #if defined (__powerc) || defined (powerc) || defined (__CFM68K__)
  22.     #pragma import on
  23. #endif
  24.  
  25. /* ANSI specified declarations */
  26.  
  27. #define EDOM        33   /* Argument outside function domain    */
  28. #define ERANGE      34   /* Result is too large to represent    */
  29.  
  30. extern int errno;
  31.  
  32. /* Mac specific declaration */
  33.  
  34. extern short MacOSErr;
  35.  
  36. /* Non-ANSI macro definitions */
  37.  
  38. #define EPERM        1   /* Operation not permitted             */
  39. #define ENOENT       2   /* No such file or directory           */
  40. #define ENORSRC      3   /* No such process                     */
  41. #define EINTR        4   /* Interrupted function call           */
  42. #define EIO          5   /* Input/Output error                  */
  43. #define ENXIO        6   /* No such device or address           */
  44. #define E2BIG        7   /* Argument list too long              */
  45. #define ENOEXEC      8   /* File not in executable format       */
  46. #define EBADF        9   /* Bad file descriptor (or number)     */
  47. #define ECHILD      10   /* No child process                    */
  48. #define EAGAIN      11   /* Resource temporarily unavailable    */
  49. #define ENOMEM      12   /* Not enough space                    */
  50. #define EACCES      13   /* File access permission denied       */
  51. #define EFAULT      14   /* Bad address as argument in call     */
  52. #define ENOTBLK     15   /* For backward compatibility          */
  53. #define EBUSY       16   /* System resource busy                */
  54. #define EEXIST      17   /* File already exists                 */
  55. #define EXDEV       18   /* Improper link attempted             */
  56. #define ENODEV      19   /* No such device                      */
  57. #define ENOTDIR     20   /* Pathname was not a directory        */
  58. #define EISDIR      21   /* Attempt to open directory for write */
  59. #define EINVAL      22   /* Invalid argument                    */
  60. #define ENFILE      23   /* Too many open files in system       */
  61. #define EMFILE      24   /* Too many open files in process      */
  62. #define ENOTTY      25   /* Inappropriate I/O control operation */
  63. #define ETXTBSY     26   /* Text file is busy                   */
  64. #define EFBIG       27   /* File too large                      */
  65. #define ENOSPC      28   /* No space left on device             */
  66. #define ESPIPE      29   /* Invalid seek                        */
  67. #define EROFS       30   /* Attempt to modify a read-only file  */
  68. #define EMLINK      31   /* Too many links on a single file     */
  69. #define EPIPE       32   /* Broken pipe; no process to read it  */
  70.  
  71.  
  72. #if defined (__powerc) || defined (powerc) || defined (__CFM68K__)
  73.     #pragma import off
  74. #endif
  75.  
  76. #endif  /* __ERRNO__ */
  77.